<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>execucao_tarefas</TITLE>
<link REL="stylesheet" href="include/style.css" type="text/css"><!--[if IE]><link REL="stylesheet" href="include/styleIE.css" type="text/css"><![endif]-->
<STYLE>
#center_block {width:95%;margin:0 auto;}
#contents_block {text-align:center;width:100%}
#header_block {width:100%;white-space:nowrap;height:31px;padding-top:5px;}
#fields_block {width:100%}
#fields_block td {padding-left:10px}
#buttons_block {width:100%;padding-bottom:5px;text-align:center}
#required_block {text-align:left;padding:5px}
#message_block {padding:5px 0px;text-align:center}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.7600.16385"></HEAD>
<BODY>{BEGIN body}
<TABLE id=center_block class=formDinArea>
  <TBODY>
  <TR>
    <TD>
      <TABLE>
        <TBODY>
        <TR>
          <TD class=formDinAreaTitulo width="100%" noWrap>
            <SCRIPT type=text/javascript 
            src="base/zapatec/utils/zapatec.js"></SCRIPT>

            <SCRIPT type=text/javascript 
            src="base/zapatec/zpcal/src/calendar.js"></SCRIPT>

            <SCRIPT type=text/javascript 
            src="base/zapatec/zpcal/lang/calendar-pt.js"></SCRIPT>
            <LINK rel=stylesheet type=text/css 
            href="base/zapatec/website/css/zpcal.css"><LINK rel=stylesheet 
            type=text/css href="base/zapatec/zpcal/themes/system.css">Execucao 
            de Tarefas, <SPAN style="COLOR: red">[ Id: {$show_key1} ]</SPAN> </TD>
          <TD style="PADDING-RIGHT: 5px; FONT-SIZE: 10px; CURSOR: pointer" 
          width=10>&nbsp;</TD></TR></TBODY></TABLE>
      {BEGIN message_block}<DIV style="BORDER-BOTTOM: rgb(255,204,0) 1px solid; BORDER-LEFT: rgb(255,204,0) 1px solid; PADDING-BOTTOM: 5px; BACKGROUND-COLOR: rgb(255,255,204); PADDING-LEFT: 5px; PADDING-RIGHT: 5px; BORDER-TOP: rgb(255,204,0) 1px solid; BORDER-RIGHT: rgb(255,204,0) 1px solid; PADDING-TOP: 5px" id="message_block{$id}" align=left><A 
      href="index.php">{$message}</A></DIV>{END message_block}&nbsp;&nbsp;&nbsp; 
      <TABLE id=fields_block border=0 cellSpacing=2 cellPadding=4 width="67%">
        <TBODY>
        {BEGIN id_atividade_fieldblock}<TR>
          <TD width=158>
            <DIV align=right><STRONG>Atividade</STRONG></DIV></STRONG>
            <DIV></DIV></TD>
          <TD colSpan=3>{$id_atividade_editcontrol} </TD></TR>{END id_atividade_fieldblock}
        {BEGIN tarefa_fieldblock}<TR>
          <TD width=158>
            <DIV align=right><STRONG>Tarefa</STRONG></DIV></STRONG>
            <DIV></DIV></TD>
          <TD colSpan=3>{$tarefa_editcontrol} </TD></TR>{END tarefa_fieldblock}
        {BEGIN data_inicio_plan_fieldblock}<TR>
          <TD width=158>
            <DIV align=right><STRONG>Data Inicio Plan</STRONG></DIV></STRONG>
            <DIV></DIV></TD>
          <TD width=181>{$data_inicio_plan_editcontrol}</TD>
          <TD width=213>
            <DIV align=right><STRONG>Data Inicio Exec </STRONG></DIV></TD>
          <TD width=390><STRONG><IMG id=dtinicio 
            onmouseover="this.style.cursor='pointer'" 
            onmouseout="this.style.cursor='default'" border=0 name=dtinicio 
            alt=" Data Inicio" 
            src="base/zapatec/zpcal/themes/icons/calendar2.gif"> {$data_inicio_exec_editcontrol} 
            </STRONG></TD></TR>{END data_inicio_plan_fieldblock}
        {BEGIN data_fim_plan_fieldblock}<TR>
          <TD width=158>
            <DIV align=right><STRONG>Data Fim Plan</STRONG></DIV></STRONG>
            <DIV></DIV></TD>
          <TD width=181>{$data_fim_plan_editcontrol}</TD>
          <TD width=213>
            <DIV align=right><STRONG>Data Fim Exec </STRONG></DIV></TD>
          <TD width=390><STRONG><IMG id=dtfim 
            onmouseover="this.style.cursor='pointer'" 
            onmouseout="this.style.cursor='default'" border=0 name=dtfim 
            alt="Data Fim" src="base/zapatec/zpcal/themes/icons/calendar2.gif"> 
            {$data_fim_exec_editcontrol} 
        </STRONG></TD></TR>{END data_fim_plan_fieldblock}
        {BEGIN data_inicio_exec_fieldblock}<DIV align=right><STRONG></STRONG></DIV>{END data_inicio_exec_fieldblock}
        {BEGIN data_fim_exec_fieldblock}<DIV align=right><STRONG></STRONG></DIV>{END data_fim_exec_fieldblock}
        {BEGIN status_fieldblock}<TR>
          <TD width=158>
            <DIV align=right><STRONG>Status</STRONG></DIV></STRONG>
            <DIV></DIV></TD>
          <TD colSpan=3>{$status_editcontrol} </TD></TR>{END status_fieldblock}</TBODY></TABLE>
      <SCRIPT type=text/javascript>
		<!--  to hide script contents from old browsers
		var startDate;
		var endDate;

		function resetDates() {
			startDate = endDate = null;
		}

		function filterDates1(cal) {
			startDate = new Date(cal.date)
			startDate.setHours(0,0,0,0)	// used for compares without TIME
			/* If they haven't chosen an 
			end date before we'll set it to the same date as the start date This
			way if the user scrolls in the start date 5 months forward, they don't
			need to do it again for the end date.
			*/

			if (endDate == null) { 
				Zapatec.Calendar.setup({
					inputField     :    "value_data_fim_exec",
					button         :    "dtfim",  // What will trigger the popup of the calendar
					ifFormat       :    "%d/%m/%Y",
					date           :     cal.date,
					showsTime      :     false,          //no time
					dateStatusFunc		:    disallowDateBefore, //the function to call
					onUpdate       :    filterDates2
				});
			}
		}

		function filterDates2(cal) {
			var date = cal.date;
			endDate = new Date(cal.date)
			endDate.setHours(0,0,0,0)	// used for compares without TIME
		}

		/*
		* This functions return true to disallow a date
		* and false to allow it.
		*/


		/* 
		* Check-Out calendar allowed dates
		* Check-Out date can not be BEFORE Check-In date
		* Check-Out date can not be before today
		*/
		function disallowDateBefore(dateCheckOut) {
			dateCheckOut.setHours(0,0,0,0)
			if ((startDate != null) && startDate > dateCheckOut)
				// startDate is defined, make sure cal date is NOT before start date
				return true; 
			
			var now = new Date()
			now.setHours(0,0,0,0)
			if (dateCheckOut < now) 
				// check out date can not be befor today if startDate NOT defined
				return true;

			return false;
		}

		/* 
		* Check-In date checking
		* Check-In date can not be AFTER Check-Out date
		* Check-In date can not be before today
		*/
		function disallowDateAfter(dateCheckIn) {
			dateCheckIn.setHours(0,0,0,0)
			if ((endDate != null) && dateCheckIn > endDate)
				// endDate defined, calendar date can NOT be after endDate
				return true;

			var now = new Date()
			now.setHours(0,0,0,0)

			if (dateCheckIn < now)
				// endDate NOT defined, calendar date can not be before today
				return true;

			return false;
		}

		// end hiding contents from old browsers  -->
	</SCRIPT>

      <SCRIPT type=text/javascript>
		var cal = new Zapatec.Calendar.setup({
		
         inputField     :    "value_data_inicio_exec",   // id of the input field
         button         :    "dtinicio",  // What will trigger the popup of the calendar
         ifFormat       :    "%d/%m/%Y",       // format of the input field: Mar 18, 2005
         showsTime      :     false,          //no time
         dateStatusFunc    :    disallowDateAfter, //the function to call
         onUpdate       :    filterDates1

		});
		
      Zapatec.Calendar.setup({
         inputField     :    "value_data_fim_exec",
         button         :    "dtfim",  // What will trigger the popup of the calendar
         ifFormat       :    "%d/%m/%Y",       // format of the input field: Mar 18, 2005
         showsTime      :     false  ,        //no time
         dateStatusFunc    :    disallowDateBefore, //the function to call
         onUpdate       :    filterDates2
      });
	  
	  
	   

	</SCRIPT>

      <DIV id=buttons_block>
      <DIV id=required_block></DIV>{BEGIN save_button}<INPUT class=button value=Salvar type=submit>{END save_button} 
      </DIV></TD></TR></TBODY></TABLE>{END body}</BODY></HTML>